package com.genius.system.bo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
@ApiModel(value = "查询字典分页BO", description = "从客户端，由用户传入的数据封装在此entity中")
public class SelectDictByPageBO {

    @Pattern(regexp = "^[0-9a-zA-Z\\u4e00-\\u9fa5]{1,10}$", message = "字典名称内容不正确")
    @ApiModelProperty("字典名称")
    private String dictName;

    @NotNull(message = "页数不能为空")
    @Min(value = 1, message = "页数不能小于1")
    @ApiModelProperty("页数")
    private Integer pageNum;

    @NotNull(message = "每页记录数不能为空")
    @Range(min = 10, max = 50, message = "每页记录数必须为10~50之间")
    @ApiModelProperty("每页记录数")
    private Integer pageSize;
}
